package gnet

import "github.com/bwmarrin/snowflake"

func GenIdStr(nodeId int64) string{
	node, err := snowflake.NewNode(nodeId)
	if err != nil {
		return ""
	}
	return node.Generate().String()
}

func GenIdInt64(nodeId int64) int64{
	node, err := snowflake.NewNode(nodeId)
	if err != nil {
		return 0
	}
	return node.Generate().Int64()
}